import { CDApi } from '@/api'
import { transformToTreeData } from '@/utils/util'
import { BasicLayout, RouteView } from '@/layouts'


// 根级菜单
const rootRouter = [{
  path: '/',
  name: 'index',
  component: BasicLayout,
  redirect: '/index'
}]


// 动态生成菜单
export const generatorDynamicRouter = (token) => {
  return new Promise((resolve, reject) => {
    // 获取后台菜单数据
  })
}


// 格式化数据 生成 vue-router 层级路由表
export const generator = (routerMap = [], parent) => {
  return routerMap.map(item => {
    return currentRouter
  })
}

